<?php

namespace Home\Controller;

use Think\Controller;
class AdminController extends Controller {


	//审核商品通过
	public function skill_pass() {
		$skill_id = $_GET['skill_id'];

		$skill = M("skill"); // 实例化User对象
		$data = array(
			'skill_state' => 1,
		);
		$info = $skill->where('skill_id=' . $skill_id)->setField($data);
		// echo $info;
		if($info) {
			echo "操作成功";
		}else{
			echo "操作失败";
		}
		
	}

	//审核商品不通过
	public function skill_no_pass() {
		$skill_id = $_GET['skill_id'];

		$skill = M("skill"); // 实例化User对象
		$data = array(
			'skill_state' => -1,
		);
		$info = $skill->where('skill_id=' . $skill_id)->setField($data);
		if($info) {
			echo "操作成功";
		}else{
			echo "操作失败";
		}
		
	}

}